#include <vector>
#include "Cell.h"
#include "Wall.h"

Cell::Cell(){
	walls = std::vector<Wall>();
	floor = Wall();
	coord_x=0;
	coord_y=0;
	coord_z=0;
	size=0;
	code=0;	
}

Cell::Cell(std::vector<Wall> w,Wall f,float cx,float cy,float cz,float s,char c){
	walls=w;
	floor=f;
	coord_x=cx;
	coord_y=cy;
	coord_z=cz;
	size=s;
	code=c;
}

void Cell::Draw()
{
	glPushMatrix();
	glTranslatef(coord_x,coord_y,coord_z);
	glScalef(size,size,1);
	floor.Draw();
	for(unsigned int i = 0 ; i < walls.size() ; i++){
		walls[i].Draw();
	}
	glTranslatef(-coord_x,-coord_y,-coord_z);
	glPopMatrix();
};

void Cell::AddWall(Wall w){
	walls.push_back(w);	
}

void Cell::Clear()
{
	walls.clear();
}

